﻿using System.Web.Mvc;
using Uber.Core.Model;
using Uber.Core.Service;

namespace Uber.WebUI.Controllers
{
    [Authorize(Roles = The.Admin)]
    public class ReviewScamController : Controller
    {
        private readonly IScams s;

        public ReviewScamController(IScams s)
        {
            this.s = s;
        }

        public ActionResult Index(int? page)
        {
            return View(s.GetPage(page ?? 1, 10));
        }

        [HttpPost]
        public ActionResult Good(long id)
        {
            s.Good(id);
            return RedirectToAction("Index");
        }

        [HttpPost]
        public ActionResult NotGood(long id, string ip)
        {
            s.NotGood(id);
            return RedirectToAction("Index");
        }
    }
}